import "reflect-metadata";
import { instanceMethods } from "./utils";

export default function ControllerDecorator(rootPath: string) {
  return function <T>(targetClass: { new (...args: any[]): T }) {
    instanceMethods(targetClass.prototype).forEach((methodname) => {
      let path = Reflect.getMetadata("path", targetClass.prototype, methodname);
      console.log("path--", path);
    });
    console.log(
      Reflect.getMetadata("prop", targetClass.prototype, "userService")
    );
  };
}
